<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Kinetis Bootloader Host: SourceFile.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Kinetis Bootloader Host
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
   <div id="projectbrief">Host Tools for Kinetis devices</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Introduction</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('apps_2elftosb_2common_2_source_file_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">apps/elftosb/common/SourceFile.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * File:    SourceFile.h</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Copyright (c) Freescale Semiconductor, Inc. All rights reserved.</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * See included license file for license details.</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#if !defined(_SourceFile_h_)</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#define _SourceFile_h_</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &lt;iostream&gt;</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &lt;fstream&gt;</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &quot;smart_ptr.h&quot;</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#include &quot;DataSource.h&quot;</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#include &quot;DataTarget.h&quot;</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#include &quot;StringMatcher.h&quot;</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#include &quot;OptionContext.h&quot;</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceelftosb.html">elftosb</a></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;{</div><div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="classelftosb_1_1_source_file.html">   33</a></span>&#160;<span class="keyword">class </span><a class="code" href="classelftosb_1_1_source_file.html">SourceFile</a></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;{</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    <span class="comment">// \brief Factory function that creates the correct subclass of SourceFile.</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    <span class="keyword">static</span> <a class="code" href="classelftosb_1_1_source_file.html">SourceFile</a> *<a class="code" href="classelftosb_1_1_source_file.html#a32cff59ce3a989ccf10b25be0c4a12ef">openFile</a>(<span class="keyword">const</span> std::string &amp;path);</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    <a class="code" href="classelftosb_1_1_source_file.html#aaeef7db97ffe06e0c9f558e1f1a69bca">SourceFile</a>(<span class="keyword">const</span> std::string &amp;path);</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="classelftosb_1_1_source_file.html#acb46a420d0bd2070581c66d9da5e0bf4">~SourceFile</a>();</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;</div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="classelftosb_1_1_source_file.html#adfda637f78758b437d7a87bde627a45c">   50</a></span>&#160;    <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classelftosb_1_1_source_file.html#adfda637f78758b437d7a87bde627a45c">setOptions</a>(<a class="code" href="classelftosb_1_1_option_context.html">OptionContext</a> *context) { <a class="code" href="classelftosb_1_1_source_file.html#afccb9fc57ff9cc5bfa43afe5002a3907">m_options</a> = context; }</div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="classelftosb_1_1_source_file.html#a2ceb6d57a1dc4b422e76675072d534c5">   52</a></span>&#160;    <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="classelftosb_1_1_option_context.html">OptionContext</a> *<a class="code" href="classelftosb_1_1_source_file.html#a2ceb6d57a1dc4b422e76675072d534c5">getOptions</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classelftosb_1_1_source_file.html#afccb9fc57ff9cc5bfa43afe5002a3907">m_options</a>; }</div><div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="classelftosb_1_1_source_file.html#aacdb5ea7b27721528dc89241fdb955fd">   54</a></span>&#160;    <span class="keyword">inline</span> <span class="keyword">const</span> std::string &amp;<a class="code" href="classelftosb_1_1_source_file.html#aacdb5ea7b27721528dc89241fdb955fd">getPath</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classelftosb_1_1_source_file.html#a65745d957af5c8306dc3deb08ef4ad12">m_path</a>; }</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    <span class="keywordtype">unsigned</span> <a class="code" href="classelftosb_1_1_source_file.html#a6ea4e7580fddb271f770dea1c3b6a3b5">getSize</a>();</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classelftosb_1_1_source_file.html#adca85268a0c1382d42b9380ffe31c39e">open</a>();</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classelftosb_1_1_source_file.html#a0a7c83d27c642615ae2c8bbf46fc025d">close</a>();</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;</div><div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="classelftosb_1_1_source_file.html#a784e0394aac1004dadbee9b264d732b4">   67</a></span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classelftosb_1_1_source_file.html#a784e0394aac1004dadbee9b264d732b4">isOpen</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (<span class="keywordtype">bool</span>)<a class="code" href="classelftosb_1_1_source_file.html#a5eb54462ddca01b8db838d6390b8a0c2">m_stream</a> &amp;&amp; <span class="keyword">const_cast&lt;</span>std::ifstream *<span class="keyword">&gt;</span>(<a class="code" href="classelftosb_1_1_source_file.html#a5eb54462ddca01b8db838d6390b8a0c2">m_stream</a>.<a class="code" href="group__smart__pointer.html#a5847524c40eea27f1c6c9cd0e0c4485b">get</a>())-&gt;is_open(); }</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> supportsNamedSections() <span class="keyword">const</span> = 0;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> supportsNamedSymbols() <span class="keyword">const</span> = 0;</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="classelftosb_1_1_data_source.html">DataSource</a> *<a class="code" href="classelftosb_1_1_source_file.html#a8a7b3266add6182caffa17a971a035d6">createDataSource</a>() = 0;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div><div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="classelftosb_1_1_source_file.html#a46815bc13a5e008033e4404f7ebfdfe3">   86</a></span>&#160;    <span class="keyword">virtual</span> <a class="code" href="classelftosb_1_1_data_source.html">DataSource</a> *<a class="code" href="classelftosb_1_1_source_file.html#a46815bc13a5e008033e4404f7ebfdfe3">createDataSource</a>(<a class="code" href="classelftosb_1_1_string_matcher.html">StringMatcher</a> &amp;matcher) { <span class="keywordflow">return</span> NULL; }</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="classelftosb_1_1_data_source.html">DataSource</a> *<a class="code" href="classelftosb_1_1_source_file.html#a8a7b3266add6182caffa17a971a035d6">createDataSource</a>(<span class="keyword">const</span> std::string &amp;section);</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classelftosb_1_1_source_file.html#a6e70cea61a759933bb47f8390f78eb5c">hasEntryPoint</a>() = 0;</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="classelftosb_1_1_source_file.html#a75b3336f542e2d1f3b3ba45e4da91893">   97</a></span>&#160;    <span class="keyword">virtual</span> uint32_t <a class="code" href="classelftosb_1_1_source_file.html#a75b3336f542e2d1f3b3ba45e4da91893">getEntryPointAddress</a>() { <span class="keywordflow">return</span> 0; }</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="classelftosb_1_1_data_target.html">DataTarget</a> *createDataTargetForSection(<span class="keyword">const</span> std::string &amp;section) { <span class="keywordflow">return</span> NULL; }</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="classelftosb_1_1_data_target.html">DataTarget</a> *createDataTargetForSymbol(<span class="keyword">const</span> std::string &amp;symbol) { <span class="keywordflow">return</span> NULL; }</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="classelftosb_1_1_data_target.html">DataTarget</a> *createDataTargetForEntryPoint();</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classelftosb_1_1_source_file.html#a4de73a78eb71707116ef52fe44598895">hasSymbol</a>(<span class="keyword">const</span> std::string &amp;name) { <span class="keywordflow">return</span> <span class="keyword">false</span>; }</div><div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="classelftosb_1_1_source_file.html#ad9e932a2a7f68034210e769f307c1b9f">  112</a></span>&#160;    <span class="keyword">virtual</span> uint32_t <a class="code" href="classelftosb_1_1_source_file.html#ad9e932a2a7f68034210e769f307c1b9f">getSymbolValue</a>(<span class="keyword">const</span> std::string &amp;name) { <span class="keywordflow">return</span> 0; }</div><div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="classelftosb_1_1_source_file.html#ae83e3674ac62739eb862b7cd81d4c3a8">  114</a></span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">unsigned</span> <a class="code" href="classelftosb_1_1_source_file.html#ae83e3674ac62739eb862b7cd81d4c3a8">getSymbolSize</a>(<span class="keyword">const</span> std::string &amp;name) { <span class="keywordflow">return</span> 0; }</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;<span class="keyword">protected</span>:</div><div class="line"><a name="l00118"></a><span class="lineno"><a class="line" href="classelftosb_1_1_source_file.html#a65745d957af5c8306dc3deb08ef4ad12">  118</a></span>&#160;    std::string <a class="code" href="classelftosb_1_1_source_file.html#a65745d957af5c8306dc3deb08ef4ad12">m_path</a>;                 </div><div class="line"><a name="l00119"></a><span class="lineno"><a class="line" href="classelftosb_1_1_source_file.html#a5eb54462ddca01b8db838d6390b8a0c2">  119</a></span>&#160;    <a class="code" href="group__smart__pointer.html">smart_ptr&lt;std::ifstream&gt;</a> <a class="code" href="classelftosb_1_1_source_file.html#a5eb54462ddca01b8db838d6390b8a0c2">m_stream</a>;  </div><div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="classelftosb_1_1_source_file.html#afccb9fc57ff9cc5bfa43afe5002a3907">  120</a></span>&#160;    <a class="code" href="group__smart__pointer.html#classsmart__ptr">smart_ptr&lt;OptionContext&gt;</a> <a class="code" href="classelftosb_1_1_source_file.html#afccb9fc57ff9cc5bfa43afe5002a3907">m_options</a>; </div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;</div><div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="classelftosb_1_1_source_file.html#a62e7eb8fb0fdb69d77ea9c8f3e1db91b">  123</a></span>&#160;    <span class="keyword">inline</span> std::ifstream *<a class="code" href="classelftosb_1_1_source_file.html#a62e7eb8fb0fdb69d77ea9c8f3e1db91b">getStream</a>() { <span class="keywordflow">return</span> <a class="code" href="classelftosb_1_1_source_file.html#a5eb54462ddca01b8db838d6390b8a0c2">m_stream</a>; }</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;};</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;</div><div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="classelftosb_1_1_binary_source_file.html">  129</a></span>&#160;<span class="keyword">class </span><a class="code" href="classelftosb_1_1_binary_source_file.html">BinarySourceFile</a> : <span class="keyword">public</span> <a class="code" href="classelftosb_1_1_source_file.html">SourceFile</a></div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;{</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00133"></a><span class="lineno"><a class="line" href="classelftosb_1_1_binary_source_file.html#ab237d9a547f20c5ebf88b8c79352eb96">  133</a></span>&#160;    <a class="code" href="classelftosb_1_1_binary_source_file.html#ab237d9a547f20c5ebf88b8c79352eb96">BinarySourceFile</a>(<span class="keyword">const</span> std::string &amp;path)</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;        : <a class="code" href="classelftosb_1_1_source_file.html">SourceFile</a>(path)</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    {</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;    }</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> supportsNamedSections()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">false</span>; }</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> supportsNamedSymbols()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">false</span>; }</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="classelftosb_1_1_data_source.html">DataSource</a> *<a class="code" href="classelftosb_1_1_source_file.html#a8a7b3266add6182caffa17a971a035d6">createDataSource</a>();</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;</div><div class="line"><a name="l00147"></a><span class="lineno"><a class="line" href="classelftosb_1_1_binary_source_file.html#abc4aa71a65aad4e4b1d5e6b613fbb569">  147</a></span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classelftosb_1_1_binary_source_file.html#abc4aa71a65aad4e4b1d5e6b613fbb569">hasEntryPoint</a>() { <span class="keywordflow">return</span> <span class="keyword">false</span>; }</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;};</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;}; <span class="comment">// namespace elftosb</span></div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;<span class="preprocessor">#endif // _SourceFile_h_</span></div><div class="ttc" id="classelftosb_1_1_source_file_html_a0a7c83d27c642615ae2c8bbf46fc025d"><div class="ttname"><a href="classelftosb_1_1_source_file.html#a0a7c83d27c642615ae2c8bbf46fc025d">elftosb::SourceFile::close</a></div><div class="ttdeci">virtual void close()</div><div class="ttdoc">Closes the file. </div><div class="ttdef"><b>Definition:</b> apps/elftosb/common/SourceFile.cpp:100</div></div>
<div class="ttc" id="classelftosb_1_1_data_source_html"><div class="ttname"><a href="classelftosb_1_1_data_source.html">elftosb::DataSource</a></div><div class="ttdoc">Abstract base class for data sources. </div><div class="ttdef"><b>Definition:</b> apps/elftosb/common/DataSource.h:33</div></div>
<div class="ttc" id="group__smart__pointer_html_a5847524c40eea27f1c6c9cd0e0c4485b"><div class="ttname"><a href="group__smart__pointer.html#a5847524c40eea27f1c6c9cd0e0c4485b">smart_ptr::get</a></div><div class="ttdeci">ptr_type get()</div><div class="ttdoc">Return the current pointer value. </div><div class="ttdef"><b>Definition:</b> apps/elftosb/common/smart_ptr.h:43</div></div>
<div class="ttc" id="group__smart__pointer_html"><div class="ttname"><a href="group__smart__pointer.html">smart_ptr&lt; std::ifstream &gt;</a></div></div>
<div class="ttc" id="classelftosb_1_1_source_file_html_a46815bc13a5e008033e4404f7ebfdfe3"><div class="ttname"><a href="classelftosb_1_1_source_file.html#a46815bc13a5e008033e4404f7ebfdfe3">elftosb::SourceFile::createDataSource</a></div><div class="ttdeci">virtual DataSource * createDataSource(StringMatcher &amp;matcher)</div><div class="ttdoc">Creates a data source out of one or more sections of the file. </div><div class="ttdef"><b>Definition:</b> apps/elftosb/common/SourceFile.h:86</div></div>
<div class="ttc" id="classelftosb_1_1_source_file_html_a2ceb6d57a1dc4b422e76675072d534c5"><div class="ttname"><a href="classelftosb_1_1_source_file.html#a2ceb6d57a1dc4b422e76675072d534c5">elftosb::SourceFile::getOptions</a></div><div class="ttdeci">const OptionContext * getOptions() const </div><div class="ttdoc">Return the option context. </div><div class="ttdef"><b>Definition:</b> apps/elftosb/common/SourceFile.h:52</div></div>
<div class="ttc" id="group__smart__pointer_html_classsmart__ptr"><div class="ttname"><a href="group__smart__pointer.html#classsmart__ptr">smart_ptr</a></div><div class="ttdoc">Simple, standard smart pointer class. </div><div class="ttdef"><b>Definition:</b> apps/elftosb/common/smart_ptr.h:18</div></div>
<div class="ttc" id="classelftosb_1_1_source_file_html_ae83e3674ac62739eb862b7cd81d4c3a8"><div class="ttname"><a href="classelftosb_1_1_source_file.html#ae83e3674ac62739eb862b7cd81d4c3a8">elftosb::SourceFile::getSymbolSize</a></div><div class="ttdeci">virtual unsigned getSymbolSize(const std::string &amp;name)</div><div class="ttdoc">Returns the size of a symbol. </div><div class="ttdef"><b>Definition:</b> apps/elftosb/common/SourceFile.h:114</div></div>
<div class="ttc" id="namespaceelftosb_html"><div class="ttname"><a href="namespaceelftosb.html">elftosb</a></div><div class="ttdef"><b>Definition:</b> BootImage.h:13</div></div>
<div class="ttc" id="classelftosb_1_1_source_file_html"><div class="ttname"><a href="classelftosb_1_1_source_file.html">elftosb::SourceFile</a></div><div class="ttdoc">Abstract base class for a source file containing executable code. </div><div class="ttdef"><b>Definition:</b> apps/elftosb/common/SourceFile.h:33</div></div>
<div class="ttc" id="classelftosb_1_1_data_target_html"><div class="ttname"><a href="classelftosb_1_1_data_target.html">elftosb::DataTarget</a></div><div class="ttdoc">Abstract base class for the target address or range of data. </div><div class="ttdef"><b>Definition:</b> apps/elftosb/common/DataTarget.h:34</div></div>
<div class="ttc" id="classelftosb_1_1_source_file_html_a8a7b3266add6182caffa17a971a035d6"><div class="ttname"><a href="classelftosb_1_1_source_file.html#a8a7b3266add6182caffa17a971a035d6">elftosb::SourceFile::createDataSource</a></div><div class="ttdeci">virtual DataSource * createDataSource()=0</div><div class="ttdoc">Creates a data source from the entire file. </div></div>
<div class="ttc" id="classelftosb_1_1_source_file_html_acb46a420d0bd2070581c66d9da5e0bf4"><div class="ttname"><a href="classelftosb_1_1_source_file.html#acb46a420d0bd2070581c66d9da5e0bf4">elftosb::SourceFile::~SourceFile</a></div><div class="ttdeci">virtual ~SourceFile()</div><div class="ttdoc">Destructor. </div><div class="ttdef"><b>Definition:</b> apps/elftosb/common/SourceFile.cpp:81</div></div>
<div class="ttc" id="classelftosb_1_1_source_file_html_a784e0394aac1004dadbee9b264d732b4"><div class="ttname"><a href="classelftosb_1_1_source_file.html#a784e0394aac1004dadbee9b264d732b4">elftosb::SourceFile::isOpen</a></div><div class="ttdeci">virtual bool isOpen() const </div><div class="ttdoc">Returns whether the file is already open. </div><div class="ttdef"><b>Definition:</b> apps/elftosb/common/SourceFile.h:67</div></div>
<div class="ttc" id="classelftosb_1_1_source_file_html_a6e70cea61a759933bb47f8390f78eb5c"><div class="ttname"><a href="classelftosb_1_1_source_file.html#a6e70cea61a759933bb47f8390f78eb5c">elftosb::SourceFile::hasEntryPoint</a></div><div class="ttdeci">virtual bool hasEntryPoint()=0</div><div class="ttdoc">Returns true if an entry point was set in the file. </div></div>
<div class="ttc" id="classelftosb_1_1_source_file_html_aacdb5ea7b27721528dc89241fdb955fd"><div class="ttname"><a href="classelftosb_1_1_source_file.html#aacdb5ea7b27721528dc89241fdb955fd">elftosb::SourceFile::getPath</a></div><div class="ttdeci">const std::string &amp; getPath() const </div><div class="ttdoc">Returns the path to the file. </div><div class="ttdef"><b>Definition:</b> apps/elftosb/common/SourceFile.h:54</div></div>
<div class="ttc" id="classelftosb_1_1_option_context_html"><div class="ttname"><a href="classelftosb_1_1_option_context.html">elftosb::OptionContext</a></div><div class="ttdoc">Pure abstract interface class to a table of options. </div><div class="ttdef"><b>Definition:</b> apps/elftosb/common/OptionContext.h:18</div></div>
<div class="ttc" id="classelftosb_1_1_source_file_html_a4de73a78eb71707116ef52fe44598895"><div class="ttname"><a href="classelftosb_1_1_source_file.html#a4de73a78eb71707116ef52fe44598895">elftosb::SourceFile::hasSymbol</a></div><div class="ttdeci">virtual bool hasSymbol(const std::string &amp;name)</div><div class="ttdoc">Returns whether a symbol exists in the source file. </div><div class="ttdef"><b>Definition:</b> apps/elftosb/common/SourceFile.h:110</div></div>
<div class="ttc" id="classelftosb_1_1_source_file_html_a65745d957af5c8306dc3deb08ef4ad12"><div class="ttname"><a href="classelftosb_1_1_source_file.html#a65745d957af5c8306dc3deb08ef4ad12">elftosb::SourceFile::m_path</a></div><div class="ttdeci">std::string m_path</div><div class="ttdoc">Path to the file. </div><div class="ttdef"><b>Definition:</b> apps/elftosb/common/SourceFile.h:118</div></div>
<div class="ttc" id="classelftosb_1_1_source_file_html_ad9e932a2a7f68034210e769f307c1b9f"><div class="ttname"><a href="classelftosb_1_1_source_file.html#ad9e932a2a7f68034210e769f307c1b9f">elftosb::SourceFile::getSymbolValue</a></div><div class="ttdeci">virtual uint32_t getSymbolValue(const std::string &amp;name)</div><div class="ttdoc">Returns the value of a symbol. </div><div class="ttdef"><b>Definition:</b> apps/elftosb/common/SourceFile.h:112</div></div>
<div class="ttc" id="classelftosb_1_1_source_file_html_adca85268a0c1382d42b9380ffe31c39e"><div class="ttname"><a href="classelftosb_1_1_source_file.html#adca85268a0c1382d42b9380ffe31c39e">elftosb::SourceFile::open</a></div><div class="ttdeci">virtual void open()</div><div class="ttdoc">Opens the file. </div><div class="ttdef"><b>Definition:</b> apps/elftosb/common/SourceFile.cpp:90</div></div>
<div class="ttc" id="classelftosb_1_1_source_file_html_a75b3336f542e2d1f3b3ba45e4da91893"><div class="ttname"><a href="classelftosb_1_1_source_file.html#a75b3336f542e2d1f3b3ba45e4da91893">elftosb::SourceFile::getEntryPointAddress</a></div><div class="ttdeci">virtual uint32_t getEntryPointAddress()</div><div class="ttdoc">Returns the entry point address. </div><div class="ttdef"><b>Definition:</b> apps/elftosb/common/SourceFile.h:97</div></div>
<div class="ttc" id="classelftosb_1_1_source_file_html_adfda637f78758b437d7a87bde627a45c"><div class="ttname"><a href="classelftosb_1_1_source_file.html#adfda637f78758b437d7a87bde627a45c">elftosb::SourceFile::setOptions</a></div><div class="ttdeci">void setOptions(OptionContext *context)</div><div class="ttdoc">Set the option context. </div><div class="ttdef"><b>Definition:</b> apps/elftosb/common/SourceFile.h:50</div></div>
<div class="ttc" id="classelftosb_1_1_binary_source_file_html_abc4aa71a65aad4e4b1d5e6b613fbb569"><div class="ttname"><a href="classelftosb_1_1_binary_source_file.html#abc4aa71a65aad4e4b1d5e6b613fbb569">elftosb::BinarySourceFile::hasEntryPoint</a></div><div class="ttdeci">virtual bool hasEntryPoint()</div><div class="ttdoc">Returns true if an entry point was set in the file. </div><div class="ttdef"><b>Definition:</b> apps/elftosb/common/SourceFile.h:147</div></div>
<div class="ttc" id="classelftosb_1_1_binary_source_file_html"><div class="ttname"><a href="classelftosb_1_1_binary_source_file.html">elftosb::BinarySourceFile</a></div><div class="ttdoc">Binary data file. </div><div class="ttdef"><b>Definition:</b> apps/elftosb/common/SourceFile.h:129</div></div>
<div class="ttc" id="classelftosb_1_1_source_file_html_afccb9fc57ff9cc5bfa43afe5002a3907"><div class="ttname"><a href="classelftosb_1_1_source_file.html#afccb9fc57ff9cc5bfa43afe5002a3907">elftosb::SourceFile::m_options</a></div><div class="ttdeci">smart_ptr&lt; OptionContext &gt; m_options</div><div class="ttdoc">Table of option values. </div><div class="ttdef"><b>Definition:</b> apps/elftosb/common/SourceFile.h:120</div></div>
<div class="ttc" id="classelftosb_1_1_source_file_html_a32cff59ce3a989ccf10b25be0c4a12ef"><div class="ttname"><a href="classelftosb_1_1_source_file.html#a32cff59ce3a989ccf10b25be0c4a12ef">elftosb::SourceFile::openFile</a></div><div class="ttdeci">static SourceFile * openFile(const std::string &amp;path)</div><div class="ttdef"><b>Definition:</b> apps/elftosb/common/SourceFile.cpp:32</div></div>
<div class="ttc" id="classelftosb_1_1_string_matcher_html"><div class="ttname"><a href="classelftosb_1_1_string_matcher.html">elftosb::StringMatcher</a></div><div class="ttdoc">Abstract interface class used to select strings by name. </div><div class="ttdef"><b>Definition:</b> apps/elftosb/common/StringMatcher.h:17</div></div>
<div class="ttc" id="classelftosb_1_1_source_file_html_a5eb54462ddca01b8db838d6390b8a0c2"><div class="ttname"><a href="classelftosb_1_1_source_file.html#a5eb54462ddca01b8db838d6390b8a0c2">elftosb::SourceFile::m_stream</a></div><div class="ttdeci">smart_ptr&lt; std::ifstream &gt; m_stream</div><div class="ttdoc">File stream, or NULL if file is closed. </div><div class="ttdef"><b>Definition:</b> apps/elftosb/common/SourceFile.h:119</div></div>
<div class="ttc" id="classelftosb_1_1_source_file_html_a62e7eb8fb0fdb69d77ea9c8f3e1db91b"><div class="ttname"><a href="classelftosb_1_1_source_file.html#a62e7eb8fb0fdb69d77ea9c8f3e1db91b">elftosb::SourceFile::getStream</a></div><div class="ttdeci">std::ifstream * getStream()</div><div class="ttdoc">Internal access to the input stream object. </div><div class="ttdef"><b>Definition:</b> apps/elftosb/common/SourceFile.h:123</div></div>
<div class="ttc" id="classelftosb_1_1_source_file_html_a6ea4e7580fddb271f770dea1c3b6a3b5"><div class="ttname"><a href="classelftosb_1_1_source_file.html#a6ea4e7580fddb271f770dea1c3b6a3b5">elftosb::SourceFile::getSize</a></div><div class="ttdeci">unsigned getSize()</div><div class="ttdoc">Get the size in bytes of the file. </div><div class="ttdef"><b>Definition:</b> apps/elftosb/common/SourceFile.cpp:108</div></div>
<div class="ttc" id="classelftosb_1_1_source_file_html_aaeef7db97ffe06e0c9f558e1f1a69bca"><div class="ttname"><a href="classelftosb_1_1_source_file.html#aaeef7db97ffe06e0c9f558e1f1a69bca">elftosb::SourceFile::SourceFile</a></div><div class="ttdeci">SourceFile(const std::string &amp;path)</div><div class="ttdoc">Default constructor. </div><div class="ttdef"><b>Definition:</b> apps/elftosb/common/SourceFile.cpp:73</div></div>
<div class="ttc" id="classelftosb_1_1_binary_source_file_html_ab237d9a547f20c5ebf88b8c79352eb96"><div class="ttname"><a href="classelftosb_1_1_binary_source_file.html#ab237d9a547f20c5ebf88b8c79352eb96">elftosb::BinarySourceFile::BinarySourceFile</a></div><div class="ttdeci">BinarySourceFile(const std::string &amp;path)</div><div class="ttdoc">Default constructor. </div><div class="ttdef"><b>Definition:</b> apps/elftosb/common/SourceFile.h:133</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_96c2f84c885cff71a930b6845f88cdd3.html">elftosb</a></li><li class="navelem"><a class="el" href="dir_c476059e18722267e10e2fb2cca6f785.html">common</a></li><li class="navelem"><b>SourceFile.h</b></li>
    <li class="footer">Generated on Mon Mar 7 2016 16:49:50 for Kinetis Bootloader Host by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
